<template>
  <a-card id="card1" :bordered="false">
    <a-carousel arrows style="margin-top:-10px;height:200px;margin-left:25px">
      <div slot="prevArrow" class="custom-slick-arrow" style="left: 10px;zIndex: 1">
        <a-icon type="left-circle" />
      </div>
      <div slot="nextArrow" class="custom-slick-arrow" style="right: 48px">
        <a-icon type="right-circle" />
      </div>
      <div>
        <a-row>
          <a-col :span="6">
            <a-card
              :bordered="true"
              style="height:250px;width:70%;margin-left:60px"
              class="C1"
              hover
              hoverable
              @click="goRoom"
            >
              <img
                alt="example"
                src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
                slot="cover"
                style="padding:10px;"
              />
              <a-card-meta title="第一个台区">
                <template v-slot:description>
                  <p style="color:white;font-size:15px;">设备数：132个</p>
                  <p style="color:white;font-size:15px">用电量：975度</p>
                </template>
              </a-card-meta>
            </a-card>
          </a-col>
          <a-col :span="6">
            <a-card
              :bordered="true"
              style="height:250px;width:70%;margin-left:30px"
              class="C1"
              hover
              hoverable
              @click="goRoom"
            >
              <img
                alt="example"
                src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
                slot="cover"
                style="padding:10px;"
              />
              <a-card-meta title="第一个台区">
                <template v-slot:description>
                  <p style="color:white;font-size:15px;">设备数：132个</p>
                  <p style="color:white;font-size:15px">用电量：975度</p>
                </template>
              </a-card-meta>
            </a-card>
          </a-col>
          <a-col :span="6">
            <a-card :bordered="true" style="height:250px;width:70%;" class="C1" hoverable>
              <img
                alt="example"
                src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
                slot="cover"
                style="padding:10px;"
              />
              <a-card-meta title="第二个台区">
                <template v-slot:description>
                  <p style="color:white;font-size:15px">设备数：132个</p>
                  <p style="color:white;font-size:15px">用电量：975度</p>
                </template>
              </a-card-meta>
            </a-card>
          </a-col>
          <a-col :span="6">
            <a-card
              :bordered="true"
              style="height:250px;width:70%;margin-left:-30px"
              class="C1"
              hoverable
            >
              <img
                alt="example"
                src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
                slot="cover"
                style="padding:10px;"
              />
              <a-card-meta title="第三个台区">
                <template v-slot:description>
                  <p style="color:white;font-size:15px">设备数：132个</p>
                  <p style="color:white;font-size:15px">用电量：975度</p>
                </template>
              </a-card-meta>
            </a-card>
          </a-col>
        </a-row>
      </div>
      <div>
        <a-row>
          <a-col :span="6">
            <a-card
              :bordered="true"
              style="height:250px;width:70%;margin-left:60px"
              class="C1"
              hover
              hoverable
              @click="goRoom"
            >
              <img
                alt="example"
                src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
                slot="cover"
                style="padding:10px;"
              />
              <a-card-meta title="第一个台区">
                <template v-slot:description>
                  <p style="color:white;font-size:15px;">设备数：132个</p>
                  <p style="color:white;font-size:15px">用电量：975度</p>
                </template>
              </a-card-meta>
            </a-card>
          </a-col>
          <a-col :span="6">
            <a-card
              :bordered="true"
              style="height:250px;width:70%;margin-left:30px"
              class="C1"
              hover
              hoverable
              @click="goRoom"
            >
              <img
                alt="example"
                src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
                slot="cover"
                style="padding:10px;"
              />
              <a-card-meta title="第一个台区">
                <template v-slot:description>
                  <p style="color:white;font-size:15px;">设备数：132个</p>
                  <p style="color:white;font-size:15px">用电量：975度</p>
                </template>
              </a-card-meta>
            </a-card>
          </a-col>
          <a-col :span="6">
            <a-card :bordered="true" style="height:250px;width:70%;" class="C1" hoverable>
              <img
                alt="example"
                src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
                slot="cover"
                style="padding:10px;"
              />
              <a-card-meta title="第二个台区">
                <template v-slot:description>
                  <p style="color:white;font-size:15px">设备数：132个</p>
                  <p style="color:white;font-size:15px">用电量：975度</p>
                </template>
              </a-card-meta>
            </a-card>
          </a-col>
          <a-col :span="6">
            <a-card
              :bordered="true"
              style="height:250px;width:70%;margin-left:-30px"
              class="C1"
              hoverable
            >
              <img
                alt="example"
                src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
                slot="cover"
                style="padding:10px;"
              />
              <a-card-meta title="第三个台区">
                <template v-slot:description>
                  <p style="color:white;font-size:15px">设备数：132个</p>
                  <p style="color:white;font-size:15px">用电量：975度</p>
                </template>
              </a-card-meta>
            </a-card>
          </a-col>
        </a-row>
      </div>
    </a-carousel>
  </a-card>
</template>

<script>
export default {
  methods: {
    goRoom() {
      this.$router.push({ path: "/region" });
    }
  }
};
</script>

<style scoped>
#card1 {
  background: rgba(255, 255, 255, 1);
  border-radius: 10px;
  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
  height: 280px;
  padding-bottom: 10px;
}
.C1 {
  background-color: #4ca6f4;
  border-radius: 10px;
}
.C1:hover {
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
}

.ant-carousel .slick-slide {
  text-align: center;
  height: 160px;
  line-height: 160px;
  background: #364d79;
  overflow: hidden;
}

.ant-carousel .custom-slick-arrow {
  width: 25px;
  height: 25px;
  font-size: 25px;
  color: blue;
  background-color: rgba(31, 45, 61, 0.11);
  opacity: 0.3;
}
.ant-carousel .custom-slick-arrow:before {
  display: none;
}
.ant-carousel .custom-slick-arrow:hover {
  opacity: 0.5;
}

.ant-carousel .slick-slide h3 {
  color: #fff;
}
</style>